import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.FileInputStream;
import java.util.Properties;
public class LeerFichero {
public static void main(String args[]){
BufferedReader br = null;
String CONF = "configuracion/leer.properties";
String file = null;
FileInputStream fis;
try {
Properties propiedades;
fis = new FileInputStream(CONF);
propiedades = new Properties();
propiedades.load(fis);
fis.close();
file = propiedades.getProperty("ruta");
} catch (Exception e1) {
System.out.println("Fichero de configuracion "+CONF+" no
encontrado!");
System.exit(1);
}
try {
br = (new BufferedReader(new FileReader(new File(file))));
} catch (FileNotFoundException e) {
System.out.println("Fichero "+file+" no encontrado!");
System.exit(1);
}
String line;
try {
while((line = br.readLine()) != null){
System.out.println(line);
}
} catch (IOException e) {
e.printStackTrace();
System.exit(1);
}
}
}
